Skip to content

Fix seconds label to always remain plural#2

Merged
kjroelke merged 4 commits into
mainfrom
copilot/update-seconds-label-plural
Nov 26, 2025
Merged

Fix seconds label to always remain plural#2
kjroelke merged 4 commits into
mainfrom
copilot/update-seconds-label-plural

Conversation

Copilot AI commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

The "Seconds" label was being singularized to "Second" when the value was 01, due to a case-sensitivity bug in the comparison logic.

Changes

  • src/components/CountdownUnit.tsx: Fixed comparison from 'seconds' to 'Seconds' to match actual label value
  • src/_utils/CountdownHandler.ts: Same fix for the frontend countdown handler

The condition 'seconds' !== 'Seconds' was evaluating to true (case-sensitive), causing singularization to apply when it shouldn't:

// Before: lowercase check didn't match capitalized label
const label = 'seconds' !== unitLabel && '01' === timeRemaining
    ? unitLabel.slice(0, -1)
    : unitLabel;

// After: correct case matching
const label = 'Seconds' !== unitLabel && '01' === timeRemaining
    ? unitLabel.slice(0, -1)
    : unitLabel;
Original prompt

This section details on the original issue you should resolve

<issue_title>Seconds should always be plural</issue_title>
<issue_description>update code so that "seconds" label is always plural if label is visible (instead of reading "01 second")</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Changed comparison from lowercase 'seconds' to uppercase 'Seconds' to
match the actual label value, preventing singularization when value is 01.

Co-authored-by: kjroelke <16909402+kjroelke@users.noreply.github.com>
Copilot AI changed the title [WIP] Update seconds label to always be plural Fix seconds label to always remain plural Nov 26, 2025
Copilot AI requested a review from kjroelke November 26, 2025 04:35
@kjroelke kjroelke marked this pull request as ready for review November 26, 2025 04:36
@kjroelke kjroelke merged commit 08fc5e5 into main Nov 26, 2025
4 checks passed
@kjroelke kjroelke deleted the copilot/update-seconds-label-plural branch November 26, 2025 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Seconds should always be plural

2 participants